const EventAggregator = require('./EventAggregator.js');
const tls = require ('tls');
const fs = require ('fs');
class AppDevice {
    constructor(socket, eventAggregator) {

    }
    get  name(){
        return 'appDevice';
    }
    connectToServer () {
    var option = {
      key: fs.readFileSync(__dirname + '/client/client-key.pem'),
      cert: fs.readFileSync(__dirname + '/client/client-cert.pem'),
      host: '127.0.0.1',
      port: 18331,
    };
    return tls.connect (option, function () {
      console.log ('connect to Tcpserver');
    })
  }
}

module.exports = AppDevice;